<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <link rel="stylesheet" href="./css/bui/bui.css">
    <link rel="stylesheet" href="./css/global/common.css">
    <link rel="stylesheet" href="./css/shop/shop.css">
</head>
<body id="shop">
<div id="app" class="bui-page">
    <div id="page_login" class="page">
        <div class="banner-wrap flex-l" :style="'left:-' + leftNum + 'vw'">
            <img :src="'./image/banner'+Number(Number(index)%3)+'.png'" class="items" v-for="(item, index) in 300" alt="">
        </div>
    </div>
    <div class="page-next-wrap">
        <img src="./image/logo.png" class="logo" alt="">
        <div class="title">性趣世界，最全的成人内容！</div>
        <img src="./image/btn1.png" class="btn-img" alt="">
        <img src="./image/btn2.png" class="btn-img" alt="">
    </div>
</div>
</body>
<script src="./script/jquery.js"></script>
<script src="./script/bui.js"></script>
<script src="./script/vue.js"></script>
<script src="./script/common.js"></script>
<script src="./script/fastclick.js"></script>
<script src="./script/md5-min.js"></script>
<script src="./script/api/api.js"></script>
<script src="./script/swiper.min.js"></script>

<script type="text/javascript">
    init_bui();
    function init_bui() {
        var timeStamp = Math.round(new Date().getTime()/1000);
        var md = '7EDBAE46DB60629CE7A072B66F78571D';
        var sign = hex_md5(timeStamp + md).toUpperCase();
        var _vue = new Vue({
            el: '#app',
            data: {
                imgData: ['./image/banner1.png','./image/banner2.png','./image/banner3.png'],
                leftNum: 0,
            },
            created() {

            },
            mounted() {
                this.init();
            },
            methods: {
                init(){
                    var _this = this;
                    setInterval(function () {
                        _this.leftNum = Number(_this.leftNum) + 100;
                    },3000);
                },
                //确认兑换
                sumbit(){
                    var _this = this;
                    if (!this.uid) return alert('请输入您的UID');
                    if (!this.password) return alert('请输入您的密码');
                    $.ajax({
                        url:"/api/login/idLogin",
                        data:{user_id: this.uid, password: this.password,sign:sign,t:timeStamp},
                        type:'post',
                        success:function(res){
                            res = JSON.parse(res);
                            if (res.success == true) {
                                window.location = './warrant.html';
                            } else {
                                alert(res.message)
                            }
                        }
                    })
                },
            },
        })

    }
</script>
</html>
